package example2;

import java.util.List;

/**
 * @Author:DarknessShadow
 * @description:
 * @date 2020/5/13 15:48
 */
public class Director {

    private Builder builder;

    public Director(Builder builder) {
        this.builder = builder;
    }

    public Builder getBuilder() {
        return builder;
    }

    public void setBuilder(Builder builder) {
        this.builder = builder;
    }
    public List  construct() {
        getBuilder().init();
        getBuilder().createFoodA();
        getBuilder().createFoodB();
        getBuilder().createDrink();
        getBuilder().createAddition();
        return getBuilder().getProductList();
    }
}
